import java.util.Date;

public class Test {



    String name;
    String gender;
    int age;

    public Test(String name,String gender,int age){
        this.name = name;
        this.gender = gender;
        this.age = age;
    }

    public String toString(){
        return "["+name+","+gender+","+age+"]";
    }

    public static void main(String[] args) {
        Test test = new Test("Jim","男",18);
        System.out.println(test);
    }


    public int year;
    public int month;
    public int day;

    public void setDay(int y,int m,int d){
        this.year = year;
        this.month = month;
        this.day = day;
        System.out.println("方法被掉用了");
    }
    public void printDate(){
        System.out.println(this.year + "/" + this.month + "/" + this.day);
    }

    public static void main2(String[] args) {
//        Test d1 = new Test();
//        Test d2 = new Test();
//        Test d3 = new Test();

//        d1.setDay(2020,9,15);
//        d2.setDay(2020,9,16);
//        d3.setDay(2020,9,17);
//
//        d1.printDate();
//        d2.printDate();
//        d3.printDate();
    }

    public static void main1(String[] args) {
        PetDog dogh = new PetDog();
        dogh.name = "大黄";
        dogh.color = "黄色";
        dogh.barks();
        dogh.wag();

        PetDog dogs = new PetDog();
        dogs.name = "小黑";
        dogs.color = "黑色";
        dogs.barks();
        dogs.wag();

    }
}



class PetDog{
    public String name = "小黑";
    public String color;

    public void barks(){
        System.out.println(name + ": 汪汪叫...");
    }

    public void wag(){
        System.out.println(name + ": 摇尾巴...");
    }
}



//static class PetDog{
//    public String name = "小黑";
//    public String color;
//
//    public void barks(){
//        System.out.println(name + ": 汪汪叫...");
//    }
//
//    public void wag(){
//        System.out.println(name + ": 摇尾巴...");
//    }
//}





class WashMachine {
    public String brand;
    public String type;
    public double weight;
    public double length;
    public double width;
    public double height;
    public String color;

    public void washClothes() {
        System.out.println("洗衣功能");
    }

    public void dryClothes() {
        System.out.println("脱水功能");
    }

    public void setTime() {
        System.out.println("定时功能");
    }
}